#求和
n = int(input("输数"))
sum=0
for i in range(1,n+1):
    sum+=i
print(sum)
#列表排序
l=[]
for i in range(3):
    x=int(input("输入整数"))
    l.append(x)
l.sort()
print(l)
print(l[::-1])#将列表倒叙输出

#99乘法
i=1
while i<10:
    j=1
    while j<i+1:
        print(f'{j}*{i}={i*j}',end='\t')
        j=j+1
    i=i+1
    print()
l = [1,2]
n=int(input("斐波那契数列长度："))
while(len(l)<n):
    l.append(l[len(l)-1]+l[len(l)-2])
print(l)
s=0
for i in range(1,1000):
    for j in range(1,i):
        if i%j==0:
            s+=j
    if (s==i):
        print(i,"是完数")
    s=0
for i in range(2,1000):
    s=i
    for j in range(1,i):
        if i%j==0:
            s-=j
    if s==0:
        print(i,"是完数")
#重叠五角星
import turtle as t
def draw_fiveStars(leng):
    count = 1
    while count <= 5:
        t.forward(leng)
        t.right(144)
        count += 1
    leng += 10
    if leng <= 100:
        draw_fiveStars(leng)
def main():
    t.penup()
    t.backward(100)
    t.pendown()
    t.pensize(2)
    t.pencolor('red')
    segment = 50
    draw_fiveStars(segment)
    t.exitonclick()
if __name__ == '__main__':
    main()